#myapp的urls.py
from django.urls import path
from .views import *
urlpatterns=[
    #定义首页的路由
    path('',myapp,name='myapp'),
    
    #ListView类视图路由
    path('MyListView/', MyListView.as_view(), name='MyListView'),
    
    #DetailView类视图路由
    path('<pk>/<age>.html', MyDetailView.as_view(), name='MyDetailView'),
    
    #FormView类视图路由
    path('MyFormView/', MyFormView.as_view(), name='MyFormView'),
    path('result',result,name='result'),

    #CreateView类视图
    path('MyCreateView/', MyCreateView.as_view(), name='MyCreateView'),

    #UpdateView类视图
    path('<pk>.html', MyUpdateView.as_view(), name='MyUpdateView'),

    #DeleteView类视图
    path('personinfo/<int:pk>/delete.html', MyDeleteView.as_view(), name='MyDeleteView'),

    #MonthArchiveView类视图
    path('Month/<int:year>/<int:month>.html', MyMonthArchiveView.as_view(), name='MyMonthArchiveView'),
    
    #WeekArchiveView类视图
    path('week/<int:year>/<int:week>.html', MyWeekArchiveView.as_view(), name='MyWeekArchiveView'),
]
